﻿using ManaSky.Api.Controllers;
using ManaSky.IService;
using ManaSky.SSO.Interface;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using ManaSky.Common.Helpers;

namespace ManaSky.Api.Areas.Manage.Controllers
{
    public class TestTController : ManageBaseController
    {
        private readonly ISysUsersService _sysUsersService;

        public TestTController(IConfiguration configuration, IAuth auth, ISysUsersService sysUsersService) : base(configuration, auth)
        {
            _sysUsersService = sysUsersService;
        }
        [HttpPost, Authorize]
        public async Task<IActionResult> GetTest()
        {
            var user = _auth.GetCurrentUser();
            var result = await _sysUsersService.GetList();
            result.ReturnData = user;
            return new JsonResult(result.ToRequest());
        }
    }
}
